package java51.lesson0529;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Shopping {

	public static void main(String[] args) {

		System.out.println("菜单界面");
		System.out.println("1：登陆");
		System.out.println("2：注册");
		System.out.println("3：联系客服");

		while (true) {
			Scanner sc = new Scanner(System.in);
			System.out.println("请选择进入的菜单");
			try {

				int choice = sc.nextInt();
				switch (choice) {
				case 1:
					System.out.println("登录界面");
					return;
				case 2:
					System.out.println("注册用户");
					return;
				case 3:
					System.out.println("联系客服解决问题");
					return;
				default:
					System.out.println("选项不存在，重新输入");
				}
			} catch (InputMismatchException e) {
				System.out.println("输入错误，重新输入");
				// e.printStackTrace();
			}

		}
	}
}
